using System.Collections.Generic;
using System.Threading.Tasks;
using CPlatePrintSys.Domain.Models;

namespace CPlatePrintSys.Infrastructure.Repositories
{
    public interface IShipRepository
    {
        Task<List<MotherShip>> GetAllMotherShipsAsync();
        Task<List<StreamShip>> GetStreamShipsByMotherIdAsync(int motherId);
        Task AddMotherShipAsync(MotherShip motherShip);
        Task DeleteMotherShipAsync(int id);
        Task AddStreamShipAsync(StreamShip streamShip);
        Task DeleteStreamShipAsync(int id);
        Task<bool> MotherShipNoExistsAsync(string shipNo);
        Task<bool> StreamShipNoExistsAsync(string shipNo);
        Task UpdateStreamShipAsync(int streamShipId, int newMotherShipId);
        /// <summary>
        /// 获取流用船号到母船号的映射（key: StreamShipNo, value: MotherShipNo）
        /// </summary>
        Task<Dictionary<string, string>> GetStreamShipToMotherShipMapAsync();
        
        /// <summary>
        /// 根据ID获取母船
        /// </summary>
        Task<MotherShip> GetMotherShipByIdAsync(int id);
        
        /// <summary>
        /// 根据ID获取流用船
        /// </summary>
        Task<StreamShip> GetStreamShipByIdAsync(int id);
        
        /// <summary>
        /// 更新母船号
        /// </summary>
        Task UpdateMotherShipNoAsync(int id, string newShipNo);
        
        /// <summary>
        /// 更新流用船号
        /// </summary>
        Task UpdateStreamShipNoAsync(int id, string newShipNo);
    }
} 